package lab01;
import  java.util.Scanner;

public class Test11 {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        System.out.println("请输入一个1~9999的数：");
        int num=sc.nextInt();

        String str=num+"";
        int digit =str.length();
        System.out.println("这个数是"+digit+"位数");

        for(int i=0;i<=digit/2-1;i++){
            if(str.charAt(i) == str.charAt(digit - i - 1)){

                System.out.println("是回文数");
                break;
            }else {
                System.out.println("不是回文数");
                break;
            }
        }

    }
}
